package com.shinemo.mpush.alloc.service;

import com.shinemo.mpush.alloc.domain.OfflineMsgVo;

import java.util.List;

/**
 * Created by ThinkPad on 2017/9/23.
 */
public interface IOfflineMsgService {
    /**
     * 保存单个用户的离线消息，形式：key: mp:msg:userId  fiele:msgId value:json串
     * @param userId 登录账号
     * @param offlineMsg 封装的离线消息
     * @return
     */
    public boolean saveOfflineMsg(String userId,OfflineMsgVo offlineMsg);

    /**
     * 给多个用户保存消息
     * @param userIds 登录账号
     * @param offlineMsg 封装的离线消息
     * @return
     */
    public boolean saveOfflineMsg(List<String> userIds, OfflineMsgVo offlineMsg);

    /**
     *
     * @param userId 登录的用户
     * @param msgId 字段值
     */
    public void delOfflineMsg(String userId,String msgId);

}
